/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";
	__webpack_require__(1);


/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {

	/// <reference path="../declare/dec.d.ts"/>
	"use strict";
	var handleChart = __webpack_require__(2);
	var appData_ts_1 = __webpack_require__(5);
	var dontShowYAndM = ['Sex', 'Familycondition', 'Homeposition', 'Workposition', 'Hobbies'];
	var currentChartHandleFn;
	$('.side-bar').on('click', 'li', function () {
	    var args = [];
	    for (var _i = 0; _i < arguments.length; _i++) {
	        args[_i - 0] = arguments[_i];
	    }
	    $('.side-bar li').removeClass('active');
	    $(this).addClass('active');
	    var link = $(this).data('link');
	    $('.s-chart-c').hide();
	    $("#" + link).parent().show();
	    if (dontShowYAndM.indexOf(link) !== -1) {
	        // console.log(link);
	        $('.wrap-y,.wrap-m').hide();
	    }
	    else {
	        $('.wrap-y,.wrap-m').show();
	    }
	    currentChartHandleFn = handleChart[("handle" + link + "Chart")];
	    if (appData_ts_1.appData.initialize.indexOf(link) === -1) {
	        appData_ts_1.appData.initialize.push(link);
	        currentChartHandleFn();
	    }
	    else {
	        console.warn('initialized');
	    }
	});
	/*默认选中性别tab*/
	setTimeout(function () {
	    $('#side-sex').trigger('click');
	}, 100);
	$('.top select.province').on('change', function () {
	    // Provice_id=$(this).val();
	    // localStorage.setItem('d','d')
	    appData_ts_1.appData.Province_id = Number($(this).val());
	    appData_ts_1.appData.initialize.splice(0, appData_ts_1.appData.initialize.length);
	});
	/*年份选择*/
	$('.top select.year').on('change', function () {
	    appData_ts_1.appData.Year = Number($(this).val());
	    appData_ts_1.appData.initialize.splice(0, appData_ts_1.appData.initialize.length);
	});
	/*月份过滤*/
	var currentDate = new Date();
	var month = currentDate.getMonth();
	var monthStart = 1;
	while (monthStart <= month + 1) {
	    var option = document.createElement('option');
	    $(option).text(monthStart).attr('value', monthStart);
	    $('.month').append(option);
	    monthStart++;
	}
	/*月份选择*/
	$('.top select.month').on('change', function () {
	    appData_ts_1.appData.Month = Number($(this).val());
	    appData_ts_1.appData.initialize.splice(0, appData_ts_1.appData.initialize.length);
	});
	$('#update-chart').on('click', function () {
	    currentChartHandleFn && currentChartHandleFn();
	});
	/*初始化省份*/
	$.ajax({
	    url: 'http://m.sz404.com/api/getprovince',
	    type: 'post',
	    data: {
	        sessionid: appData_ts_1.appData.Cookie
	    },
	    success: function (data) {
	        if (data.code == 0) {
	            for (var _i = 0, _a = data.provinces; _i < _a.length; _i++) {
	                var province = _a[_i];
	                $('#s-province').append("<option value=" + province.id + ">" + province.name + "</option>");
	            }
	            $('#s-province').val('2');
	        }
	    },
	    error: function () {
	    }
	});
	/**/
	var user = localStorage.getItem('sgm_remember_username');
	if (user) {
	    $('#currentUser').text(user);
	}
	else {
	    location.assign('login.html');
	}
	$('input[name="sessionid"]').val(appData_ts_1.appData.Cookie);
	$('#logout').on('click', function () {
	    localStorage.removeItem('sgm_remember_username');
	    localStorage.removeItem('sgm_remember_password');
	    location.assign('login.html');
	});
	$('#reimport').on('click', function () {
	    $('#already-upload').modal({
	        show: true,
	        backdrop: 'static'
	    });
	});
	$('#upload-go').click(function () {
	    var formdata = new FormData(document.getElementById('upload-form'));
	    handleChart.upload(formdata, document.getElementById('already-upload'));
	});
	$(document.body).css('height', window.innerHeight).show();
	// $('.side-bar').css('height',)
	/**/ 


/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";
	/// <reference path="../declare/dec.d.ts"/>
	var action_ts_1 = __webpack_require__(3);
	var appData_ts_1 = __webpack_require__(5);
	function noData(parent) {
	    var p = document.createElement('p');
	    p.innerHTML = '未查询到相关数据';
	    $(p).css({
	        fontWeight: 'bold',
	        'text-align': 'center',
	        padding: '20px',
	        margin: '0px'
	    });
	    parent.appendChild(p);
	}
	var Chart = (function () {
	    function Chart(id, chartEntity) {
	        this.id = id;
	        this.chartEntity = chartEntity;
	        this.initialized = false;
	    }
	    Chart.prototype.paint = function (option) {
	        this.chartEntity.setOption(option);
	    };
	    Chart.prototype.resize = function () {
	        this.chartEntity.resize();
	        return this;
	    };
	    Chart.prototype.showLoading = function () {
	        this.chartEntity.showLoading();
	        return this;
	    };
	    Chart.prototype.hideLoading = function () {
	        this.chartEntity.hideLoading();
	        return this;
	    };
	    return Chart;
	}());
	function chartFactory(id) {
	    return new Chart(id, echarts.init(document.getElementById(id)));
	}
	/*车主性别*/
	var sexChart = chartFactory('Sex');
	var sexAction = action_ts_1.default('getsex');
	// window.sexChart=sexChart;
	function handleSexChart() {
	    sexChart.resize().showLoading();
	    sexAction.post({
	        province_id: appData_ts_1.appData.Province_id,
	        sessionid: appData_ts_1.appData.Cookie
	    }, {
	        success: function (text) {
	            if (text.code === 0) {
	                var option = {
	                    tooltip: {
	                        trigger: 'item',
	                        formatter: "{a} <br/>{b}: {c} ({d}%)"
	                    },
	                    legend: {
	                        orient: 'vertical',
	                        x: 'left',
	                    },
	                    series: [{
	                            name: '性别比例',
	                            type: 'pie',
	                            radius: ['50%', '70%'],
	                            avoidLabelOverlap: false,
	                            label: {
	                                normal: {
	                                    show: false,
	                                    position: 'center'
	                                },
	                                emphasis: {
	                                    show: true,
	                                    textStyle: {
	                                        fontSize: '30',
	                                        fontWeight: 'bold'
	                                    }
	                                }
	                            },
	                            labelLine: {
	                                normal: {
	                                    show: false
	                                }
	                            },
	                            data: [{
	                                    value: text.male,
	                                    name: '男性用户',
	                                    itemStyle: {
	                                        normal: {
	                                            color: '#5CB6F9'
	                                        }
	                                    }
	                                }, {
	                                    value: text.female,
	                                    name: '女性用户',
	                                    itemStyle: {
	                                        normal: {
	                                            color: '#FFAE3B'
	                                        }
	                                    }
	                                }, {
	                                    value: text.unknow,
	                                    name: '未知',
	                                    itemStyle: {
	                                        normal: {
	                                            color: 'gray'
	                                        }
	                                    }
	                                },]
	                        }]
	                };
	                var total = text.male + text.female + text.unknow;
	                $('#male-num').text(Math.round(text.male / total * 10000) / 100 + '%');
	                $('#female-num').text(Math.round(text.female / total * 10000) / 100 + '%');
	                $('#unknow-num').text(Math.round(text.unknow / total * 10000) / 100 + '%');
	                sexChart.hideLoading().paint(option);
	            }
	        },
	        error: function () {
	            console.warn('boom');
	            // console.trace();
	            // sexChart.paint({})
	        }
	    });
	}
	exports.handleSexChart = handleSexChart;
	/*家庭状况信息*/
	var familyconditionChart = chartFactory('Familycondition');
	var familyconditionAction = action_ts_1.default('familycondition');
	function handleFamilyconditionChart() {
	    familyconditionChart.resize().showLoading();
	    familyconditionAction.post({
	        province_id: appData_ts_1.appData.Province_id,
	        sessionid: appData_ts_1.appData.Cookie
	    }, {
	        success: function (text) {
	            var option = {
	                tooltip: {
	                    trigger: 'item',
	                    formatter: "{a} <br/>{b}: {c} ({d}%)"
	                },
	                legend: {
	                    orient: '2',
	                    x: 'left',
	                },
	                series: [{
	                        name: '家庭状况',
	                        type: 'pie',
	                        radius: ['50%', '70%'],
	                        avoidLabelOverlap: false,
	                        label: {
	                            normal: {
	                                show: false,
	                                position: 'center'
	                            },
	                            emphasis: {
	                                show: true,
	                                textStyle: {
	                                    fontSize: '30',
	                                    fontWeight: 'bold'
	                                }
	                            }
	                        },
	                        labelLine: {
	                            normal: {
	                                show: false
	                            }
	                        },
	                        data: [{
	                                value: text.baby,
	                                name: '育有子女',
	                                itemStyle: {
	                                    normal: {
	                                        color: '#F6D234'
	                                    }
	                                }
	                            }, {
	                                value: text.unknow,
	                                name: '未知',
	                                itemStyle: {
	                                    normal: {
	                                        color: '#58A2DF'
	                                    }
	                                }
	                            },]
	                    }]
	            };
	            var total = text.baby + text.unknow;
	            $('#have-num').text(Math.round(text.baby / total * 10000) / 100 + '%');
	            $('#no-num').text(Math.round(text.unknow / total * 10000) / 100 + '%');
	            familyconditionChart.hideLoading().paint(option);
	        },
	        error: function () {
	            // familyconditionChart.paint(option)
	        }
	    });
	}
	exports.handleFamilyconditionChart = handleFamilyconditionChart;
	// handleFamilycondition();
	/*车主常驻地区域*/
	var homepositionChart = chartFactory('Homeposition');
	var homepositionAction = action_ts_1.default('getLocation?action=homeposition');
	function magnify(max) {
	    switch (true) {
	        case max > 1100:
	            return 5 / 11;
	        case max > 1000:
	            return 0.5;
	        case max > 800:
	            return 0.65;
	        case max > 600:
	            return 5 / 6;
	        case max > 400:
	            return 5 / 4;
	        case max > 200:
	            return 5 / 2;
	        default:
	            return 1;
	    }
	}
	// window.homepositionChart=homepositionChart;
	function handleHomepositionChart() {
	    homepositionChart.resize().showLoading();
	    homepositionAction.post({
	        province_id: appData_ts_1.appData.Province_id,
	        sessionid: appData_ts_1.appData.Cookie
	    }, {
	        success: function (data) {
	            if (data.code === 0) {
	                var magnifyer = magnify(data.max);
	                var mapData = [];
	                for (var _i = 0, _a = data.points; _i < _a.length; _i++) {
	                    var p = _a[_i];
	                    mapData.push({
	                        value: [p.lng, p.lat, Math.round(p.count * magnifyer)]
	                    });
	                }
	                var option = {
	                    title: {
	                        // text: '车主常驻地',
	                        left: 'center'
	                    },
	                    tooltip: {
	                        trigger: 'item'
	                    },
	                    bmap: {
	                        center: [104.114129, 37.550339],
	                        zoom: 5,
	                        roam: true,
	                        mapStyle: {
	                            styleJson: [{
	                                    'featureType': 'water',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#d1d1d1'
	                                    }
	                                }, {
	                                    'featureType': 'land',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#f3f3f3'
	                                    }
	                                }, {
	                                    'featureType': 'railway',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'visibility': 'off'
	                                    }
	                                }, {
	                                    'featureType': 'highway',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#fdfdfd'
	                                    }
	                                }, {
	                                    'featureType': 'highway',
	                                    'elementType': 'labels',
	                                    'stylers': {
	                                        'visibility': 'off'
	                                    }
	                                }, {
	                                    'featureType': 'arterial',
	                                    'elementType': 'geometry',
	                                    'stylers': {
	                                        'color': '#fefefe'
	                                    }
	                                }, {
	                                    'featureType': 'arterial',
	                                    'elementType': 'geometry.fill',
	                                    'stylers': {
	                                        'color': '#fefefe'
	                                    }
	                                }, {
	                                    'featureType': 'poi',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'visibility': 'off'
	                                    }
	                                }, {
	                                    'featureType': 'green',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'visibility': 'off'
	                                    }
	                                }, {
	                                    'featureType': 'subway',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'visibility': 'off'
	                                    }
	                                }, {
	                                    'featureType': 'manmade',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#d1d1d1'
	                                    }
	                                }, {
	                                    'featureType': 'local',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#d1d1d1'
	                                    }
	                                }, {
	                                    'featureType': 'arterial',
	                                    'elementType': 'labels',
	                                    'stylers': {
	                                        'visibility': 'off'
	                                    }
	                                }, {
	                                    'featureType': 'boundary',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#fefefe'
	                                    }
	                                }, {
	                                    'featureType': 'building',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#d1d1d1'
	                                    }
	                                }, {
	                                    'featureType': 'label',
	                                    'elementType': 'labels.text.fill',
	                                    'stylers': {
	                                        'color': '#999999'
	                                    }
	                                }]
	                        }
	                    },
	                    series: [{
	                            name: '车主常住地',
	                            type: 'scatter',
	                            coordinateSystem: 'bmap',
	                            data: mapData,
	                            // data:[{
	                            //     value:[100,100,500]
	                            // }],
	                            symbolSize: function (val) {
	                                return val[2] / 10;
	                            },
	                            label: {
	                                normal: {
	                                    formatter: '{b}',
	                                    position: 'right',
	                                    show: false
	                                },
	                                emphasis: {
	                                    show: true
	                                }
	                            },
	                            itemStyle: {
	                                normal: {
	                                    color: 'purple'
	                                }
	                            }
	                        }]
	                };
	                homepositionChart.hideLoading().paint(option);
	            }
	        },
	        error: function () { }
	    });
	}
	exports.handleHomepositionChart = handleHomepositionChart;
	/*车主工作地区域*/
	var workpositionChart = chartFactory('Workposition');
	var workpositionAction = action_ts_1.default('getLocation?action=workposition');
	function handleWorkpositionChart() {
	    workpositionChart.resize().showLoading();
	    workpositionAction.post({
	        province_id: appData_ts_1.appData.Province_id,
	        sessionid: appData_ts_1.appData.Cookie
	    }, {
	        success: function (data) {
	            if (data.code === 0) {
	                var magnifyer = magnify(data.max);
	                var mapData = [];
	                for (var _i = 0, _a = data.points; _i < _a.length; _i++) {
	                    var p = _a[_i];
	                    mapData.push({
	                        value: [p.lng, p.lat, Math.round(p.count * magnifyer)]
	                    });
	                }
	                var option = {
	                    title: {
	                        // text: '车主工作地',
	                        left: 'center'
	                    },
	                    tooltip: {
	                        trigger: 'item'
	                    },
	                    bmap: {
	                        center: [104.114129, 37.550339],
	                        zoom: 5,
	                        roam: true,
	                        mapStyle: {
	                            styleJson: [{
	                                    'featureType': 'water',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#d1d1d1'
	                                    }
	                                }, {
	                                    'featureType': 'land',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#f3f3f3'
	                                    }
	                                }, {
	                                    'featureType': 'railway',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'visibility': 'off'
	                                    }
	                                }, {
	                                    'featureType': 'highway',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#fdfdfd'
	                                    }
	                                }, {
	                                    'featureType': 'highway',
	                                    'elementType': 'labels',
	                                    'stylers': {
	                                        'visibility': 'off'
	                                    }
	                                }, {
	                                    'featureType': 'arterial',
	                                    'elementType': 'geometry',
	                                    'stylers': {
	                                        'color': '#fefefe'
	                                    }
	                                }, {
	                                    'featureType': 'arterial',
	                                    'elementType': 'geometry.fill',
	                                    'stylers': {
	                                        'color': '#fefefe'
	                                    }
	                                }, {
	                                    'featureType': 'poi',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'visibility': 'off'
	                                    }
	                                }, {
	                                    'featureType': 'green',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'visibility': 'off'
	                                    }
	                                }, {
	                                    'featureType': 'subway',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'visibility': 'off'
	                                    }
	                                }, {
	                                    'featureType': 'manmade',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#d1d1d1'
	                                    }
	                                }, {
	                                    'featureType': 'local',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#d1d1d1'
	                                    }
	                                }, {
	                                    'featureType': 'arterial',
	                                    'elementType': 'labels',
	                                    'stylers': {
	                                        'visibility': 'off'
	                                    }
	                                }, {
	                                    'featureType': 'boundary',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#fefefe'
	                                    }
	                                }, {
	                                    'featureType': 'building',
	                                    'elementType': 'all',
	                                    'stylers': {
	                                        'color': '#d1d1d1'
	                                    }
	                                }, {
	                                    'featureType': 'label',
	                                    'elementType': 'labels.text.fill',
	                                    'stylers': {
	                                        'color': '#999999'
	                                    }
	                                }]
	                        }
	                    },
	                    series: [{
	                            name: '车主工作地',
	                            type: 'scatter',
	                            coordinateSystem: 'bmap',
	                            data: mapData,
	                            // data:[{
	                            //     value:[100,100,500]
	                            // }],
	                            symbolSize: function (val) {
	                                return val[2] / 10;
	                            },
	                            label: {
	                                normal: {
	                                    formatter: '{b}',
	                                    position: 'right',
	                                    show: false
	                                },
	                                emphasis: {
	                                    show: true
	                                }
	                            },
	                            itemStyle: {
	                                normal: {
	                                    color: 'purple'
	                                }
	                            }
	                        }]
	                };
	                workpositionChart.hideLoading().paint(option);
	            }
	        },
	        error: function () { }
	    });
	}
	exports.handleWorkpositionChart = handleWorkpositionChart;
	var verticalmediaChart = chartFactory('Verticalmedia');
	var verticalmediaAction = action_ts_1.default('verticalmedia');
	function rv(name, data) {
	    $('#' + name).text(data[name]);
	}
	function handleVerticalmediaChart() {
	    verticalmediaChart.resize().showLoading();
	    verticalmediaAction.post({
	        province_id: appData_ts_1.appData.Province_id,
	        sessionid: appData_ts_1.appData.Cookie,
	        year: appData_ts_1.appData.Year,
	        month: appData_ts_1.appData.Month
	    }, {
	        success: function (data) {
	            if (data.code === 0) {
	                var option = {
	                    color: ['#F3AA17'],
	                    tooltip: {
	                        trigger: 'axis',
	                        axisPointer: {
	                            type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
	                        }
	                    },
	                    grid: {
	                        left: '3%',
	                        right: '4%',
	                        bottom: '3%',
	                        containLabel: true
	                    },
	                    xAxis: [{
	                            type: 'category',
	                            data: ['汽车之家', '易车网', '太平洋汽车网', '爱卡汽车'],
	                            axisTick: {
	                                alignWithLabel: true
	                            },
	                            axisLine: {
	                                lineStyle: {
	                                    color: 'white'
	                                }
	                            }
	                        }],
	                    yAxis: [{
	                            type: 'value',
	                            axisLine: {
	                                lineStyle: {
	                                    color: 'white'
	                                }
	                            }
	                        }],
	                    series: [{
	                            name: '直接访问',
	                            type: 'bar',
	                            barWidth: '60%',
	                            data: [data.autohome, data.yiche, data.pcauto, data.xcar]
	                        }]
	                };
	                rv('autohome', data);
	                rv('yiche', data);
	                rv('pcauto', data);
	                rv('xcar', data);
	                verticalmediaChart.hideLoading().paint(option);
	            }
	        },
	        error: function () { }
	    });
	}
	exports.handleVerticalmediaChart = handleVerticalmediaChart;
	var webtopChart = document.getElementById('Webtop');
	var webtopAction = action_ts_1.default('webtop');
	function handleWebtopChart() {
	    webtopAction.post({
	        province_id: appData_ts_1.appData.Province_id,
	        sessionid: appData_ts_1.appData.Cookie,
	        year: appData_ts_1.appData.Year,
	        month: appData_ts_1.appData.Month
	    }, {
	        success: function (data) {
	            // data.webtop.length=0
	            if (data.code === 0) {
	                var topOne = document.getElementById('web-top-one'), leftNine = document.getElementById('web-left-nine');
	                topOne.innerHTML = '', leftNine.innerHTML = '';
	                for (var _i = 0, _a = data.webtop; _i < _a.length; _i++) {
	                    var web = _a[_i];
	                    var img = document.createElement('img'), imgWrap = document.createElement('div');
	                    img.setAttribute('src', "../images/logo/" + web.label + ".png");
	                    $(imgWrap).css({
	                        width: '33%',
	                        display: 'inline-block',
	                        vertical: 'top',
	                        'text-align': 'center'
	                    }).append(img);
	                    web.pv === 1 ? (topOne.appendChild(imgWrap)) : (leftNine.appendChild(imgWrap));
	                }
	                if (!data.webtop.length)
	                    noData(webtopChart);
	            }
	            else {
	            }
	        },
	        error: function (data) { }
	    });
	}
	exports.handleWebtopChart = handleWebtopChart;
	var apptopChart = document.getElementById('Apptop');
	var apptopAction = action_ts_1.default('apptop');
	function handleApptopChart() {
	    apptopAction.post({
	        province_id: appData_ts_1.appData.Province_id,
	        sessionid: appData_ts_1.appData.Cookie,
	        year: appData_ts_1.appData.Year,
	        month: appData_ts_1.appData.Month
	    }, {
	        success: function (data) {
	            if (data.code === 0) {
	                var topOne = document.getElementById('app-top-one'), leftNine = document.getElementById('app-left-nine');
	                topOne.innerHTML = '', leftNine.innerHTML = '';
	                for (var _i = 0, _a = data.apptop; _i < _a.length; _i++) {
	                    var web = _a[_i];
	                    //图片处理
	                    var img = document.createElement('img'), imgWrap = document.createElement('div');
	                    img.setAttribute('src', "../images/logo/" + web.label + ".png");
	                    $(imgWrap).css({
	                        width: '33%',
	                        display: 'inline-block',
	                        vertical: 'top',
	                        'text-align': 'center'
	                    }).append(img);
	                    web.pv === 1 ? (topOne.appendChild(imgWrap)) : (leftNine.appendChild(imgWrap));
	                }
	                if (!data.apptop.length)
	                    noData(apptopChart);
	            }
	        },
	        error: function (data) { }
	    });
	}
	exports.handleApptopChart = handleApptopChart;
	var cartop = document.getElementById('Cartop');
	var cartopAction = action_ts_1.default('cartop');
	function handleCartopChart() {
	    cartopAction.post({
	        province_id: appData_ts_1.appData.Province_id,
	        sessionid: appData_ts_1.appData.Cookie,
	        year: appData_ts_1.appData.Year,
	        month: appData_ts_1.appData.Month
	    }, {
	        success: function (data) {
	            if (data.code === 0) {
	                // console.log()
	                var fragment = document.createDocumentFragment();
	                for (var _i = 0, _a = data.cartype; _i < _a.length; _i++) {
	                    var car = _a[_i];
	                    // let carDom=document.createElement('')
	                    var carDom = document.createElement('div');
	                    $(carDom).addClass('cartop-car');
	                    carDom.innerHTML = "<img src=\"\" alt=\"\">\n                            <div class=\"car-content\">\n                                <p class=\"car-name\">" + car.name + "</p>\n                                <div style=\"width:100%;border-top:3px solid #c7c3c3\"><div style=\"border-top:3px solid #FFAE3B;width:80%;margin-top:-3px\"></div></div>\n                                <p class=\"car-concer\">" + car.concer + "</p>\n                                <p>/\u6708\u5173\u6CE8\u6570</p>\n                            </div>";
	                    fragment.appendChild(carDom);
	                }
	                cartop.innerHTML = '';
	                cartop.appendChild(fragment);
	                if (!data.cartype.length)
	                    noData(cartop);
	            }
	            console.log(data);
	        },
	        error: function (data) { }
	    });
	}
	exports.handleCartopChart = handleCartopChart;
	var compare = document.getElementById('Comparisons');
	var comparisonsAction = action_ts_1.default('comparisons');
	function handleComparisonsChart() {
	    comparisonsAction.post({
	        province_id: appData_ts_1.appData.Province_id,
	        sessionid: appData_ts_1.appData.Cookie,
	        year: appData_ts_1.appData.Year,
	        month: appData_ts_1.appData.Month
	    }, {
	        success: function (data) {
	            if (data.code === 0) {
	                // console.log()
	                var fragment = document.createDocumentFragment();
	                for (var _i = 0, _a = data.cartype; _i < _a.length; _i++) {
	                    var car = _a[_i];
	                    // let carDom=document.createElement('')
	                    var carDom = document.createElement('div');
	                    $(carDom).addClass('cartop-car');
	                    carDom.innerHTML = "<img src=\"\" alt=\"\">\n                        <div class=\"car-content\">\n                            <p class=\"car-name\">" + car.name + "</p>\n                            <div style=\"width:100%;border-top:3px solid #c7c3c3\"><div style=\"border-top:3px solid #FFAE3B;width:80%;margin-top:-3px\"></div></div>\n                            <p class=\"car-concer\">" + car.concer + "</p>\n                            <p>/\u6708\u5173\u6CE8\u6570</p>\n                        </div>";
	                    fragment.appendChild(carDom);
	                }
	                // let cartop = document.getElementById('Comparisons');
	                compare.innerHTML = '';
	                compare.appendChild(fragment);
	                if (!data.cartype.length)
	                    noData(compare);
	            }
	            console.log(data);
	        },
	        error: function (data) { }
	    });
	}
	exports.handleComparisonsChart = handleComparisonsChart;
	function formatterLabel(param) {
	    return param.data * 100 + '%';
	}
	function formatterTooltip(param) {
	    console.log(param);
	    return param;
	}
	var hobbiesChart = chartFactory('Hobbies');
	var hobbiesAction = action_ts_1.default('hobbies');
	function handleHobbiesChart() {
	    hobbiesChart.resize().showLoading();
	    hobbiesAction.post({
	        province_id: appData_ts_1.appData.Province_id,
	        sessionid: appData_ts_1.appData.Cookie
	    }, {
	        success: function (data) {
	            if (data.code === 0) {
	                var legendData = [], seriesData = [];
	                for (var _i = 0, _a = data.taste; _i < _a.length; _i++) {
	                    var taste = _a[_i];
	                    legendData.push(taste.name);
	                    seriesData.push({
	                        name: taste.name,
	                        type: 'bar',
	                        stack: '比例',
	                        label: {
	                            normal: {
	                                show: true,
	                                position: 'top',
	                                formatter: formatterLabel
	                            }
	                        },
	                        data: [taste.ratio.toFixed(5)]
	                    });
	                }
	                var option = {
	                    tooltip: {
	                        trigger: 'axis',
	                        axisPointer: {
	                            type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
	                        },
	                    },
	                    legend: {
	                        data: legendData
	                    },
	                    grid: {
	                        left: '3%',
	                        right: '4%',
	                        bottom: '3%',
	                        containLabel: true
	                    },
	                    xAxis: {
	                        type: 'value'
	                    },
	                    yAxis: {
	                        type: 'category',
	                        data: ['车主兴趣爱好']
	                    },
	                    series: seriesData
	                };
	                hobbiesChart.hideLoading().paint(option);
	            }
	        },
	        error: function () {
	        }
	    });
	}
	exports.handleHobbiesChart = handleHobbiesChart;
	var uploadAction = action_ts_1.getActionOfImportPhone('importphone');
	function upload(form, modal) {
	    // var formdata = new FormData(<HTMLFormElement>document.getElementById('upload-form'));
	    uploadAction.post(form, {
	        success: function (data) {
	            if (data.code === 0) {
	                // location.assign('chart.html')
	                alert('上传成功');
	            }
	            else {
	                alert('上传失败');
	            }
	            modal && $(modal).modal('hide');
	        },
	        error: function () {
	            alert('上传失败');
	        }
	    });
	}
	exports.upload = upload;


/***/ },
/* 3 */
/***/ function(module, exports, __webpack_require__) {

	"use strict";
	/// <reference path="../declare/dec.d.ts"/>
	var route_ts_1 = __webpack_require__(4);
	function getAction(action) {
	    return {
	        url: (route_ts_1.routeConfig.domain + route_ts_1.routeConfig.path) + "/" + action,
	        post: function (data, callback) {
	            $.ajax({
	                url: this.url,
	                type: 'post',
	                data: data,
	                success: callback.success,
	                error: callback.error
	            });
	        }
	    };
	}
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.default = getAction;
	function getActionOfImportPhone(action) {
	    return {
	        url: (route_ts_1.routeConfig.domain + route_ts_1.routeConfig.path) + "/" + action,
	        post: function (data, callback) {
	            $.ajax({
	                url: this.url,
	                type: 'post',
	                processData: false,
	                data: data,
	                contentType: false,
	                success: callback.success,
	                error: callback.error
	            });
	        }
	    };
	}
	exports.getActionOfImportPhone = getActionOfImportPhone;


/***/ },
/* 4 */
/***/ function(module, exports) {

	"use strict";
	exports.routeConfig = {
	    domain: 'http://m.sz404.com',
	    path: '/api'
	};


/***/ },
/* 5 */
/***/ function(module, exports) {

	"use strict";
	/*全局应用数据*/
	exports.appData = {
	    Province_id: 2,
	    Cookie: localStorage.getItem('sgm_chart_session'),
	    Year: 2016,
	    Month: 1,
	    initialize: []
	};


/***/ }
/******/ ]);